package com.lc.luzhengtang.adapter;

import android.view.ViewGroup;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lc.luzhengtang.R;
import com.lc.luzhengtang.conn.Conn;
import com.lc.luzhengtang.conn.ConngenerateOrder;
import com.zcx.helper.scale.ScaleScreenHelperFactory;

import java.util.List;

/**
 * 文 件 名: NewsListAdapter
 * 创 建 人: zhangyu
 * 创建日期: 16/12/24 19:55
 * 邮   箱: yuanchong121@gmail.com
 * 修改时间：
 * 修改备注：
 */
public class ConfirmListAdapter extends BaseQuickAdapter<ConngenerateOrder.Info.Goods, BaseViewHolder> {
    public ConfirmListAdapter(List<ConngenerateOrder.Info.Goods> data) {

        super(R.layout.item_generate_order, data);
    }


    @Override
    protected void convert(BaseViewHolder helper, ConngenerateOrder.Info.Goods item) {
        ScaleScreenHelperFactory.getInstance().loadView((ViewGroup) helper.convertView);
        Glide.with(mContext).load(Conn.HOST3 + item.picurl).crossFade().error(R.mipmap.zhanwei).placeholder(R.mipmap.zhanwei).into((ImageView) helper.getView(R.id.img_shop_logo));
        helper.setText(R.id.text_newstime,item.title);
        helper.setText(R.id.text_newstitle,"￥"+item.sales);
        helper.setText(R.id.text_num,"x"+item.number+"");
//        helper.setText(R.id.text_he,item.weight);

    }


}
